package com.lz.base.project.thread.callable;

import com.lz.base.common.utils.http.OkHttpUtil;
import com.lz.base.common.utils.http.SstInf;

import java.util.concurrent.Callable;

public class ThreadCallable implements Callable {
    private String city;
    String s;

    public ThreadCallable(String city) {
        this.city = city;
    }

    @Override
    public Object call() throws Exception {
        try {
            SstInf sstInf = new SstInf();
            sstInf.setInfFullUrl("https://query.asilu.com/weather/baidu");
            sstInf.setInfRequest("{city: " + city + "}");
            s = OkHttpUtil.requestGet(sstInf);
            System.out.println("city:" + s);
        } catch (Exception e) {
        }
        return s;
    }
}